package lumis.service.comment;

import lumis.content.service.ContentQuickListServiceInterface;
import lumis.content.service.DetailsUtil;
import lumis.portal.PortalException;
import lumis.portal.PortalRequestParameters;
import lumis.portal.serviceinterface.IServiceInterfaceRenderRequest;
import lumis.portal.serviceinterface.IServiceInterfaceRenderResponse;
import lumis.portal.serviceinterface.ServiceInterfaceException;
/**
 * It decides if the interface is rendered or not, based 
 * on the presence of an itemId.
 *
 * @version $Revision: 8732 $ $Date: 2008-01-08 12:00:58 -0200 (Tue, 08 Jan 2008) $
 * @since 4.0.10
 */
public class CommentQuickListServiceInterface extends ContentQuickListServiceInterface
{

	@Override
	public void render(IServiceInterfaceRenderRequest request, IServiceInterfaceRenderResponse response) throws ServiceInterfaceException, PortalException
	{
		String itemId = request.getParameter(PortalRequestParameters.PAGE_PARAMETER_ITEMID);
		
		if(itemId == null)
			itemId = DetailsUtil.getCurrentItemId();
		
		if(itemId != null)
			super.render(request, response);
	}
	
}
